//
//  UIViewController+Function.h
//  KKCategory
//
//  Created by liaozhenming on 16/5/17.
//  Copyright © 2016年 liaozhenming. All rights reserved.
//

#import <UIKit/UIKit.h>


typedef void(^UIViewControllerBackEventHandle)(id value);

@interface UIViewController (Function)

+ (instancetype)kk_viewControllerFromXIB;
+ (instancetype)kk_viewControllerFromXIBWithNibName:(NSString *)nibName;

+ (instancetype)kk_viewControllerFromStoryboard;
+ (instancetype)kk_viewControllerFromStoryboardWithIdentifier:(NSString *)identifier;
+ (instancetype)kk_viewControllerFromStoryboardWithStoryboardName:(NSString *)storyboardName identifier:(NSString *)identifier;

- (void)kk_pushViewController:(UIViewController*)viewController;
- (void)kk_presentViewController:(UIViewController*)viewController;

@property (nonatomic, copy) UIViewControllerBackEventHandle kk_backEventHandle; /**<视图返回到前一个界面时需要执行的事件回调 */

@end
